<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<!--<script type="text/javascript" th:inline="javascript">
  var ctxPath = [[${#request.getContextPath()}]];
</script>-->
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
姓名:<label th:text="${name}"></label><br>
年龄:<label th:text="${age}"></label>
<br>
<div>
<!--if标签 判断语句-->
<!-- th:if 成立时能看到
     th:unless  不成立时能看到-->
<label th:if="${isOk}">女士信息列表</label>     <!-- if -->
<label th:unless="${isOk}">男士信息列表</label>  <!-- else -->
<label th:if="${nickname}=='小明'">small ming</label>
</div>
<br>
<!--value标签  给input标签 设值-->
<form action="/sb/user/login">
  <input type="text" name="uname" th:value="${uname}"><br>
  <input type="password" name="pwd" th:value="${pwd}"><br>
  <input type="submit" value="登录">
</form>

<br>
<!--**3、themeleaf循环标签**

    th:each=”变量名,状态:${集合}”
    -->
<ul>
  <li th:each="book : ${books}" th:text="${book}"></li>
</ul>
<br>

<table border="1px solid black" cellspacing="2">
  <thead>
  <tr>
    <td >序号</td>
    <td >书籍名字</td>
    <td t>书籍价格</td>
    <td><a href="#">删除</a></td>
  </tr>

  </thead>
  <tbody>


  <tr th:each="books,status : ${books}">


      <td th:text="${status.index}">循环下标</td>
      <td th:text="${books.name}">书籍名字</td>
      <td th:text="${books.price}">书籍价格</td>
      <td><a href="#">删除</a></td>


  </tr>
  </tbody>
</table>

<br>
<!--**4、th:任意属性** 给指定属性赋值-->
<p th:style="${style}"> 通过thymeleaf给当前文字设置style</p>
<br>
<!-- 算术运算-->
<p th:${x + y}}></p>
</body>
</html>